﻿// <copyright file="QueryElement.cs" company="Todd Aspeotis">
//  Copyright © 2011 Todd Aspeotis
// </copyright>

namespace LocalReportsEngine.ReportDefinitionElements
{
    using System.Xml.Serialization;

    /// <summary>
    /// Provides a representation of the Query element.
    /// </summary>
    public class QueryElement
    {
        /// <summary>
        /// Prevents a default instance of the QueryElement class from being created.
        /// </summary>
        private QueryElement()
        {
        }

        /// <summary>
        /// Gets the name of the report definition element this class represents.
        /// </summary>
        public static string ElementName
        {
            get { return "Query"; }
        }

        /// <summary>
        /// Gets or sets the value of the CommandText child element.
        /// </summary>
        public string CommandText { get; set; }

        /// <summary>
        /// Gets or sets the value of the CommandType child element.
        /// </summary>
        public string CommandType { get; set; }

        /// <summary>
        /// Gets or sets the value of the DataSource child element.
        /// </summary>
        public string DataSourceName { get; set; }

        /// <summary>
        /// Gets or sets the value of the Name attribute.
        /// </summary>
        [XmlAttribute("Name")]
        public string Name { get; set; }

        /// <summary>
        /// Gets or sets the value of the Timeout attribute.
        /// </summary>
        public string Timeout { get; set; }
    }
}
